#ifndef _PACKET_H_
#define _PACKET_H_
#include "ctype.h"
unsigned short CRC_16(void *pvStartAddress, unsigned long ulSize);
unsigned char CalChecksum(unsigned char *payload, unsigned long len);
int GetMyTime(CHAR* pBuf);

int IrdetoAssembleCommand(unsigned char ins,
						  unsigned char *payload, 
						  unsigned long payloadLen, 
						  unsigned char *message, 
						  unsigned long *messageLen);

void SsuAssembleMessage(unsigned short tag,
						unsigned char *payload, 
						unsigned long payloadLen, 
						unsigned char *message, 
					    unsigned long *messageLen);

void AppAssembleMessage(unsigned short tag,
						unsigned char *payload,
						unsigned long payloadLen,
						unsigned char *message,
					    unsigned long *messageLen);
#endif
